package com.xzx.shop_front_api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.persistence.Column;
import lombok.Data;
import org.springframework.stereotype.Component;

/**
 * 优惠券实体类
 */
@Component
@Data
@TableName("shop_coupons")
public class Coupon {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String title;
    private int value;
    private int status;
    @JsonProperty("start_time")
    private int startTime;
    @JsonProperty("end_time")
    private Integer endTime;
    @JsonProperty("create_time")
    private Integer createdTime;
    private String mark;
    @JsonProperty("min_money")
    private double minMoney;

    @TableField(exist = false)
    @JsonProperty("start_times")
    private String strStartTime;
    @TableField(exist = false)
    @JsonProperty("end_times")
    private String strEndTime;
}
